/* 知道宽高
*/

.wp{
    width: 300px;
    height: 300px;
    border: 3px solid greenyellow;
}
.child-width{
    width: 100px;
    height: 100px;
    border: 3px solid yellow;
}

/*1 position+margin */
/* .wp{
    position: relative;
}
.child{
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
} */

/*2 position+ -margin */
/* .wp{
    position: relative;
}
.child{
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -50px;
    margin-top: -50px;
} */

/*3 position+ -calc
    类似上面的变种
*/
/* .wp{
    position: relative;
}
.child{
    position: absolute;
    top:calc(50% - 50px);
    left: calc(50% - 50px);
} */


/*4 position+ flex
    父元素设置就好了
*/
/* .wp{
    display: flex;
    align-items: center;
    justify-content: center;
} */

/*5 position+ flex
    父元素设置就好了
*/
/* .wp{
    display: flex;
    align-items: center;
    justify-content: center;
} */

/*6 position+ grid
    父元素设置就好了
*/
/* .wp{
    display: grid;
}
.child{
    align-self: center;
    justify-self: center;
} */

/*7 position + transform:translate(相对于child自己的宽度50%)
*/
/* .wp{
    position: relative;
}
.child{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
} */

/*7 position + transform:translate(相对于child自己的宽度50%)
*/
.wp{
    display: flex;
}
.child{
    margin: auto;
}

/*
    8.writing-mode
    <div class="wp">
        <div class="wp-inner">
            <div class="box">123123</div>
        </div>
    </div>
*/

.wp {
    writing-mode: vertical-lr;
    text-align: center;
}
.wp-inner {
    writing-mode: horizontal-tb;
    display: inline-block;
    text-align: center;
    width: 100%;
}
.box {
    display: inline-block;
    margin: auto;
    text-align: left;
}

button {
    background-image: linear-gradient(#5187c4, #1c2f45);
    background-size: auto 200%;
    background-position: 0 100%;
    transition: background-position 0.5s;
}    
button:hover {
    background-position: 0 0;
}

.box-shadow {
    background-color: #FF8020;
    width: 160px;
    height: 90px;
    margin-top: -45px;
    margin-left: -80px;
    position: absolute;
    top: 50%;
    left: 50%;
}
.box-shadow:after {
    content: "";
    width: 150px;
    height: 1px;
    margin-top: 88px;
    margin-left: -75px;
    display: block;
    position: absolute;
    left: 50%;
    z-index: -1;
    -webkit-box-shadow: 0px 0px 8px 2px #000000;
    -moz-box-shadow: 0px 0px 8px 2px #000000;
    box-shadow: 0px 0px 8px 2px #000000;
}
/*如果你碰到一个比自身容器长的文本，这个技巧对你很有用。在这个示例中，默认时，不管容器的宽度，文本都将水平填充。*/
.pre {
    white-space: pre-line;
    word-wrap: break-word;
}
/*马赛克了 哈哈哈哈*/
.blurry-text {
    color: transparent;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
 }

 .loading:after {
    overflow: hidden;
    display: inline-block;
    vertical-align: bottom;
    animation: ellipsis 2s infinite;
    content: "\2026"; /* ascii code for the ellipsis character */
}
@keyframes ellipsis {
    from {
        width: 2px;
    }
    to {
        width: 15px;
    }
}

/*跨浏览器设置最小高度*/

#container {
    min-height: 550px;
    height: auto !important;
    height: 550px;
}

.chat-bubble {
    background-color: #ededed;
    border: 2px solid #666;
    font-size: 35px;
    line-height: 1.3em;
    margin: 10px auto;
    padding: 10px;
    position: relative;
    text-align: center;
    width: 300px;
    -moz-border-radius: 20px;
    -webkit-border-radius: 20px;
    -moz-box-shadow: 0 0 5px #888;
    -webkit-box-shadow: 0 0 5px #888;
    font-family: 'Bangers', arial, serif; 
}
.chat-bubble-arrow-border {
    border-color: #666 transparent transparent transparent;
    border-style: solid;
    border-width: 20px;
    height: 0;
    width: 0;
    position: absolute;
    bottom: -42px;
    left: 30px;
}
.chat-bubble-arrow {
    border-color: #ededed transparent transparent transparent;
    border-style: solid;
    border-width: 20px;
    height: 0;
    width: 0;
    position: absolute;
    bottom: -39px;
    left: 30px;
}


